package com.company.management.mapper.reward;


import com.company.management.domain.reward.Department;
import com.company.management.domain.reward.TalentUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DepartmentMapper {
 
    @Select("SELECT * FROM T_Department")
    List<Department> getAllDepartments();
 
    @Select("SELECT * FROM T_USER WHERE dept_id = #{departmentId} and user_id != #{userId} and is_admin = 0 and emp_status = 0")
    List<TalentUser> getUsersByDepartmentId(@Param("departmentId") Integer departmentId, @Param("userId") Integer userId);
}